# Contributor: Galen Abell <galen@galenabell.com>
# Maintainer: Galen Abell <galen@galenabell.com>
pkgname=py3-sphinx-autoapi
_pyname=sphinx-autoapi
pkgver=1.8.3
pkgrel=1
pkgdesc="Automatic API documentation for Sphinx"
url="https://sphinx-autoapi.readthedocs.io"
arch="noarch !x86"  # build breaks on x86
license="MIT"
depends="python3 py3-astroid py3-jinja2 py3-sphinx py3-unidecode py3-yaml"
makedepends="py3-setuptools"
checkdepends="py3-mock py3-pytest"
source="https://files.pythonhosted.org/packages/source/${_pyname%${_pyname#?}}/$_pyname/$_pyname-$pkgver.tar.gz"
builddir="$srcdir/$_pyname-$pkgver"

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH="build:$PYTHONPATH" pytest -v
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
af6f1daa82cdb2795a0e1a12029d84906e365bd50968c44ded78c806026176f22ef1c2138332dde60a5343a0455d141c3046d75b65e7b9862aed816bb78066ec  sphinx-autoapi-1.8.3.tar.gz
"
